import { MOBILE_INFO, PUT_MOBILE_INFO } from '../types/mobile'

const INITIAL_STATE = {
  mobile: {}
}

export default function counter(state = INITIAL_STATE, action) {
  switch (action.type) {
    case MOBILE_INFO:
      return {
        ...state,
        mobile: action.payload
      }
    case PUT_MOBILE_INFO:
      return {
        ...state,
        mobile: Object.assign(state.mobile, action.payload)
      }
    default:
      return state
  }
}
